<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>JsChartViewer.setPlotAreaMouseMargin2</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="JsChartViewer.htm">JsChartViewer</a>.<wbr>setPlotAreaMouseMargin2</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
setPlotAreaMouseMargin2(leftMargin, rightMargin, topMargin, bottomMargin)
</div>
<p class="heading2">Description</p>
<div class="content">
Sets the margins of the plot area mouse event region.<br><br>
Plot area events are often used for implementing track cursors. For example, a track line can be drawn that follows the mouse cursor when the mouse cursor is moving on the plot area. For these usages, it is important to be able to put the mouse cursor at the edge of the plot area, because the latest data points are usually plotted at the edge.<br><br>
In practice, it is difficult to put the mouse cursor exactly on the edge, as it is hard to move the mouse cursor precisely. To address this issue, ChartDirector supports extending the plot area event region by a configuration margin. A mouse cursor on that extended region will be treated as if it is on the nearest edge of the plot area for the purpose of trigger plot area events. The same applies to touch events.<br><br>
By default, the left, right, top and bottom margins of the plot area event region are 5 pixels.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>leftMargin</td><td>(Mandatory)</td><td>The left margin in pixels.</td></tr><tr><td>rightMargin</td><td>(Mandatory)</td><td>The right margin in pixels.</td></tr><tr><td>topMargin</td><td>(Mandatory)</td><td>The top margin in pixels.</td></tr><tr><td>bottomMargin</td><td>(Mandatory)</td><td>The bottom margin in pixels.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
None
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
